﻿@using JQueryUIHelpers
@model CS795.TravelAgency.Models.FlightRequestViewModel

@Scripts.Render("~/bundles/jqueryui")

@using (Ajax.BeginForm("RequestFlightQuote", "Trip", new { tripId = ViewBag.TripId }, new AjaxOptions { UpdateTargetId = "flight-data", LoadingElementId = "loading", OnSuccess = "FlightSuccess" }, new { id = "request-quote-flight-form", @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary("", new { @class = "text-danger" })
    <div class="form-group">
        @Html.LabelFor(m => m.SeatType, new { @class = "col-md-3 control-label" })
        <div class="col-md-6">
            @Html.DropDownListFor(m => m.SeatType, new SelectList(@ViewBag.SeatTypes), new { @class = "form-control" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(m => m.Date, new { @class = "col-md-3 control-label" })
        <div class="col-md-6">
            @Html.JQueryUI().DatepickerFor(m => m.Date)
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(m => m.Departure, new { @class = "col-md-3 control-label" })
        <div class="col-md-6">
            @Html.TextBoxFor(m => m.Departure, new { @class = "form-control" })
        </div>
    </div>
    
    <div class="form-group">
        @Html.LabelFor(m => m.Destination, new { @class = "col-md-3 control-label" })
        <div class="col-md-6">
            @Html.TextBoxFor(m => m.Destination, new { @class = "form-control" })
        </div>
    </div>
    
    <div class="form-group">
        @Html.LabelFor(m => m.Count, new { @class = "col-md-3 control-label" })
        <div class="col-md-6">
            @Html.JQueryUI().SpinnerFor(m => m.Count, new { @class = "form-control" })
        </div>
    </div>
}
